home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / Other Langs / MacPerl ƒ / Perl Source ƒ / Perl / Makefile.in < prev    next >
Makefile  |  1993-10-25  |  5KB  |  161 lines

  1. #
  2. # Makefile template for MPW Perl. Copyright © 1991-93 Matthias Neeracher & Tim Endres 
  3. # Turn this into a Makefile by running it or by editing it manually
  4. #
  5.  
  6. Perl -Sx "{0}"
  7. Exit
  8.  
  9. #!/usr/local/bin/perl
  10.  
  11. rename("Makefile", "Makefile.bak");
  12.  
  13. unless (open(MAKEFILE, ">Makefile")) {
  14.     rename("Makefile.bak", "Makefile");
  15.     
  16.     die "Failed to open Makefile for writing.";
  17. }
  18.  
  19. while (<DATA>) {
  20.     last if (/^### BEGIN/);
  21.     print MAKEFILE;
  22. }
  23.  
  24. while (<DATA>) {
  25.     last if (/^### END/);
  26.     if (/(\w+)(\s*=\s*)(\S*)/) {
  27.         $repl = ask($1, $3);
  28.         
  29.         if ($repl) {
  30.             print MAKEFILE $1, $2, $repl, "\n";
  31.         } else {
  32.             print MAKEFILE;
  33.         }
  34.     }
  35. }
  36.  
  37. while (<DATA>) {
  38.     print MAKEFILE;
  39. }
  40.  
  41. __END__
  42. #######################################################################
  43. #    Project    :    Perl                -    
  44. #    File        :    Makefile            -    Generated automatically from Makefile.in
  45. #    Author    :    Copyright © 1991-93 Matthias Neeracher & Tim Endres
  46. #         You may distribute under the terms of the Perl Artistic License,
  47. #     as specified in the README file.
  48. #    Started    :    22Oct93                                Language    :    MPW Shell/Make
  49. #    Modified    :    22Oct93    MN    
  50. #    Last        :    22Oct93
  51. #######################################################################
  52.  
  53. ### BEGIN LOCAL DEFINITIONS.    Don't change this line !
  54. PerlSrc         = :
  55. PerlObj        = :Obj:
  56. bin             = "{MPW}Tools"    
  57. privlib         = "{MPW}Libraries:PerlLibs"
  58. helpdir        = "{Boot}411"
  59. YACC             = yacc
  60. ### END LOCAL DEFINITIONS.    Don't change this line !
  61.  
  62. COptions        = -mbg full -sym on -mf -i {PerlSrc} -d DEBUGGING
  63.  
  64. public         = Perl 
  65. scripts         = h2ph
  66.  
  67. LibFiles        =     "{CLibraries}GUSI.o"                        ∂
  68.                     "{CLibraries}GUSI_Everything.cfg"    ∂
  69.                     "{CLibraries}StdCLib.o"                 ∂
  70.                     "{Libraries}RTLib.o"                     ∂
  71.                     "{Libraries}Runtime.o"                     ∂
  72.                     "{Libraries}Interface.o"                 ∂
  73.                     "{Libraries}ToolLibs.o"                    ∂
  74.                     "{CLibraries}Math.o"                     ∂
  75.                     "{CLibraries}CSANELib.o"                ∂
  76.                     "{CLibraries}libdb.o"
  77.  
  78. ObjectFiles    =    {PerlObj}alloca.c.o                         ∂
  79.                     {PerlObj}array.c.o                         ∂
  80.                     {PerlObj}cmd.c.o                             ∂
  81.                     {PerlObj}cons.c.o                         ∂
  82.                     {PerlObj}consarg.c.o                     ∂
  83.                     {PerlObj}doarg.c.o                         ∂
  84.                     {PerlObj}doio.c.o                         ∂
  85.                     {PerlObj}dolist.c.o                         ∂
  86.                     {PerlObj}dump.c.o                            ∂
  87.                     {PerlObj}eval.c.o                         ∂
  88.                     {PerlObj}form.c.o                         ∂
  89.                     {PerlObj}hash.c.o                         ∂
  90.                     {PerlObj}icemalloc.c.o                    ∂
  91.                     {PerlObj}missing.c.o                         ∂
  92.                     {PerlObj}reentrant.c.o                    ∂
  93.                     {PerlObj}regcomp.c.o                         ∂
  94.                     {PerlObj}regexec.c.o                        ∂
  95.                     {PerlObj}stab.c.o                         ∂
  96.                     {PerlObj}str.c.o                             ∂
  97.                     {PerlObj}toke.c.o                         ∂
  98.                     {PerlObj}util.c.o                         ∂
  99.                     {PerlObj}SubLaunch.a.o                    ∂
  100.                     {PerlObj}SubLaunch.c.o                    ∂
  101.                     {PerlObj}usersub.c.o                        ∂
  102.                     {PerlObj}macperl.c.o
  103.                     
  104. {PerlObj}    ƒ    {PerlSrc}
  105. .c.o            ƒ    .c
  106.     {C} {COptions} -s {Default} {DepDir}{Default}.c -o {TargDir}{Default}.c.o
  107.  
  108. # These are the top level targets
  109.     
  110. All            ƒ    Perl Perl.o
  111.  
  112. Perl            ƒƒ    {PerlObj}perly.c.o {PerlObj}perl.c.o                ∂
  113.                     {ObjectFiles} {CLibraries}GUSI.o
  114.     Link -model far -sym on -mf -c 'MPS ' -t MPST {LOptions}     ∂
  115.         {PerlObj}perly.c.o                     ∂
  116.         {PerlObj}perl.c.o                        ∂
  117.         {ObjectFiles}                             ∂
  118.         {LibFiles}                                 ∂
  119.         -o Perl
  120.         
  121. Perl            ƒƒ    {PerlSrc}Perl.r {PerlSrc}Perl.rsrc
  122.     Rez -a -c 'MPS ' -t MPST -s {PerlSrc} {PerlSrc}Perl.r -o Perl
  123.  
  124. PerlHelp.index    ƒ    PerlHelp
  125.     Entab -a 250 PerlHelp > PerlHelp.nu
  126.     Rename -y PerlHelp.nu PerlHelp
  127.     Get PerlHelp -q -y -k PerlHelp >Dev:Null
  128.     
  129. Distribution    ƒ Perl PerlHelp.index
  130.     Distribute PerlTool.distr Mac_Perl_410_tool.sit
  131.  
  132. InstallPerl        ƒ Perl PerlHelp.index
  133.     Install {bin} {privlib} {helpdir}
  134.  
  135. Install            ƒ    InstallPerl
  136.  
  137. Cleanƒ
  138.     delete -y {PerlObj}≈.o all Perl Perl.o
  139.  
  140. # Nondefault dependences
  141.  
  142. Perl.o        ƒ {PerlObj}perly.c.o {PerlObj}saperl.c.o {ObjectFiles}
  143.     Lib -mf {LibFlags} {ObjectFiles} {PerlObj}perly.c.o {PerlObj}saperl.c.o -o Perl.o
  144.  
  145. {PerlObj}perly.c.o    ƒ {PerlSrc}perly.c
  146.     {C} {COptions} -model far -s perly {PerlSrc}perly.c -o {PerlObj}perly.c.o
  147. {PerlObj}initexternals.c.o    ƒ initexternals.c
  148.     {C} {COptions} -model far -s initexternals initexternals.c -o {PerlObj}initexternals.c.o
  149. {PerlObj}saperl.c.o    ƒ {PerlSrc}perl.c
  150.     {C} {COptions} -d MAC_STANDALONE -s perl -d main=run_perl {PerlSrc}perl.c -o {PerlObj}saperl.c.o
  151. {PerlSrc}perly.h        ƒ {PerlSrc}perly.c
  152. {PerlSrc}perly.c        ƒ {PerlSrc}perly.y
  153.     echo 'Expect either' 29 shift/reduce and 59 reduce/reduce conflicts...
  154.     echo '           or' 27 shift/reduce and 61 reduce/reduce conflicts...
  155.     {YACC} -d {PerlSrc}perly.y
  156.     rename {PerlSrc}y.tab.c {PerlSrc}perly.c
  157.     Perl -i.bak -pe 's/printf\(\"yydebug/fprintf\(perldbg, \"yydebug/' {PerlSrc}perly.c
  158.     rename {PerlSrc}y.tab.h {PerlSrc}perly.h
  159.     echo 'extern YYSTYPE yylval;' >>{PerlSrc}perly.h
  160.